home *** CD-ROM | disk | FTP | other *** search
- From: mh1@irz301.inf.tu-dresden.de (Michael Hohmuth)
- Subject: Environment variables
- Date: Fri, 29 Jan 93 18:08:50 MET
- Mime-Version: 1.0
-
-
- I think it's consense that we should aim for POSIX compatibelity on the
- C library level in MiNT. I wonder how it will be possible to have old
- programs and new ones (which, for instance, know how to handle Unix
- filenames like /foo and /dev/c/bar) coexist, especially if old and new
- programs share environment variables.
-
- For the PATH environment variable, the MiNT library contains a hack to
- convert it back and forth when entering the program/spawning a new
- program.
-
- Ideally, environment variables which contain file names/paths would be
- passed on between programs in Unix compatible form. However, this is
- impossible because most programs expect them in DOS form.
-
- I think we need to pass the environment in DOS form; but, because it's
- especially ugly to puff up programs with file name/environment variable
- conversions, #ifdef's and things like _dox2unx() when porting from the
- Unix platform to the Atari, I think that the environment conversion (as
- with PATH) should be generalized/automatized in the library.
-
- What I want is to convert _all_ environment variables (which contain
- file names/paths) to the Unix form in the startup code (not just the PATH
- variable), and convert it back when spawning. To prevent environment
- variables which do not contain file names from being converted, a scheme
- has to be developed that prevents this. I have one in mind already.
-
- Would changing the MiNT library this way be acceptable?
-
- Michael
-
- PS: Besides, system() should be fixed to spawn a /bin/sh when MiNT is
- active, and _dos2unx() should should convert c:\foo\bar to
- /dev/c/foo/bar, not c:/foo/bar. (Something for your scratchpad,
- entropy?)
-
- --
- Internet: hohmuth@freia.inf.tu-dresden.de
-